useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_17'

	if window('Protocol Buffer Editor'):
		select('FileChooser', commonBits.sampleDir() + 'protoStoreSales5im.bin')
		click('Edit1')
		assert_p('JTreeTable', 'Content', '[[, , 20, Store: 20], [, , 59, Store: 59], [, , 166, Store: 166], [, , 184, Store: 184]]')
##		select('JTreeTable', '')
		rightclick('JTreeTable', 'Tree,0')
		select_menu('Expand Tree')
		select('LayoutCombo', 'Prefered')
		rightclick('JTreeTable', 'Tree,1')
		select_menu('Expand Tree')

		rightclick('JTreeTable', 'Tree,2')
		select_menu('Expand Tree')

		rightclick('JTreeTable', 'Tree,3')
		select_menu('Expand Tree')

		rightclick('JTreeTable', 'Tree,6')
		select_menu('Fully Expand Tree')
		assert_p('JTreeTable', 'Content', '[[, , 20, Store: 20, , , ], [, , , , , , ], [, , 170, Department: 170, , , ], [, , , , , , ], [, , 63604808, [40118], [1], [4870], [SALE]], [, , 1, 4870, 1, , ], [, , 280, Department: 280, , , ], [, , , , , , ], [, , 69684558, [40118, 40118, 40118], [1, -1, 1], [19000, -19000, 5010], [SALE, RETURN, SALE]], [, , 69694158, [40118, 40118, 40118], [1, -1, 1], [19000, -19000, 5010], [SALE, RETURN, SALE]], [, , 2, 10020, 6, , ], [, , 685, Department: 685, , , ], [, , 929, Department: 929, , , ], [, , 957, Department: 957, , , ], [, , , , , , ], [, , 16, 26060, 13, , ], [, , 59, Store: 59, , , ], [, , 166, Store: 166, , , ], [, , 184, Store: 184, , , ]]')
		select_menu('View>>Show Proto Definition')
##		assert_p('JTreeTable', 'Content', '[[, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , store, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , ], [, , department, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Deptartment, , ], [, , order, 4, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Order, , ], [, , summary, 5, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Summary, , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , saleDate, 2, LABEL_REPEATED, TYPE_INT32, , , ], [, , quantity, 3, LABEL_REPEATED, TYPE_INT32, , , ], [, , price, 4, LABEL_REPEATED, TYPE_INT64, , , ], [, , saleType, 5, LABEL_REPEATED, TYPE_ENUM, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.SaleType, , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , quantity, 2, LABEL_REQUIRED, TYPE_INT32, , , ], [, , , , , , , , ], [, , , , , , , , ], [, , department, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , ], [, , product, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Product, , ], [, , summary, 4, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Summary, , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , saleDate, 2, LABEL_REPEATED, TYPE_INT32, , , ], [, , quantity, 3, LABEL_REPEATED, TYPE_INT32, , , ], [, , price, 4, LABEL_REPEATED, TYPE_INT64, , , ], [, , saleType, 5, LABEL_REPEATED, TYPE_ENUM, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.SaleType, , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , quantity, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , price, 2, LABEL_REQUIRED, TYPE_INT64, , , ], [, , count, 3, LABEL_REQUIRED, TYPE_INT32, , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , , , , , , , ], [, , quantity, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , price, 2, LABEL_REQUIRED, TYPE_INT64, , , ], [, , count, 3, LABEL_REQUIRED, TYPE_INT32, , , ], [, , , , , , , , ]]')
		assert_p('JTreeTable', 'Content', '[[, , , , , , , , ], [, , , , , , , , ], [, , StoreSales5SD.proto, , , , , , ], [, , , , , , , , ], [, , Store, , , , , , ], [, , , , , , , , ], [, , store, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , ], [, , department, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Deptartment, , ], [, , order, 4, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Order, , ], [, , summary, 5, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Summary, , ], [, , , , , , , , ], [, , StoreSales5SD_Product.proto, , , , , , ], [, , , , , , , , ], [, , Product, , , , , , ], [, , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , saleDate, 2, LABEL_REPEATED, TYPE_INT32, , , ], [, , quantity, 3, LABEL_REPEATED, TYPE_INT32, , , ], [, , price, 4, LABEL_REPEATED, TYPE_INT64, , , ], [, , saleType, 5, LABEL_REPEATED, TYPE_ENUM, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.SaleType, , ], [, , , , , , , , ], [, , StoreSales5SD_Enum.proto, , , , , , ], [, , , , , , , , ], [, , SaleType, , , , , , ], [, , , , , , , , ], [, , RETURN, , , , , , ], [, , OTHER, , , , , , ], [, , SALE, , , , , , ], [, , StoreSales5SD_OrderDept.proto, , , , , , ], [, , , , , , , , ], [, , Order, , , , , , ], [, , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , quantity, 2, LABEL_REQUIRED, TYPE_INT32, , , ], [, , Deptartment, , , , , , ], [, , , , , , , , ], [, , department, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , ], [, , product, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Product, , ], [, , summary, 4, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Summary, , ], [, , , , , , , , ], [, , StoreSales5SD_Product.proto, , , , , , ], [, , , , , , , , ], [, , Product, , , , , , ], [, , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , saleDate, 2, LABEL_REPEATED, TYPE_INT32, , , ], [, , quantity, 3, LABEL_REPEATED, TYPE_INT32, , , ], [, , price, 4, LABEL_REPEATED, TYPE_INT64, , , ], [, , saleType, 5, LABEL_REPEATED, TYPE_ENUM, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.SaleType, , ], [, , , , , , , , ], [, , StoreSales5SD_Enum.proto, , , , , , ], [, , , , , , , , ], [, , SaleType, , , , , , ], [, , , , , , , , ], [, , RETURN, , , , , , ], [, , OTHER, , , , , , ], [, , SALE, , , , , , ], [, , StoreSales5SD_Summary.proto, , , , , , ], [, , , , , , , , ], [, , Summary, , , , , , ], [, , , , , , , , ], [, , quantity, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , price, 2, LABEL_REQUIRED, TYPE_INT64, , , ], [, , count, 3, LABEL_REQUIRED, TYPE_INT32, , , ], [, , , , , , , , ], [, , StoreSales5SD_Summary.proto, , , , , , ], [, , , , , , , , ], [, , Summary, , , , , , ], [, , , , , , , , ], [, , quantity, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , price, 2, LABEL_REQUIRED, TYPE_INT64, , , ], [, , count, 3, LABEL_REQUIRED, TYPE_INT32, , , ], [, , , , , , , , ]]')

##		click('ScrollPane$ScrollBar', 12, 55)
		select('LayoutCombo', 'Prefered')
##		assert_p('JTreeTable', 'Content', '[[, , , , , , , , ], [, , , , , , , , ], [, , StoreSales5SD.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [\'StoreSales5SD_Product.proto\',\'StoreSales5SD_OrderDept.proto\',\'StoreSales5SD_Summary.proto\'], , , , ], [, , , , , , , , ], [, , Store, , , , , , ], [, , , , , , , , ], [, , store, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , ], [, , department, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Deptartment, , ], [, , order, 4, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Order, , ], [, , summary, 5, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Summary, , ], [, , , , , SPEED, , , ], [, , StoreSales5SD_Product.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [\'StoreSales5SD_Enum.proto\'], , , , ], [, , , , , , , , ], [, , Product, , , , , , ], [, , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , saleDate, 2, LABEL_REPEATED, TYPE_INT32, , , ], [, , quantity, 3, LABEL_REPEATED, TYPE_INT32, , , ], [, , price, 4, LABEL_REPEATED, TYPE_INT64, , , ], [, , saleType, 5, LABEL_REPEATED, TYPE_ENUM, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.SaleType, , ], [, , , , , SPEED, , , ], [, , StoreSales5SD_Enum.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [], , , , ], [, , , , , , , , ], [, , SaleType, , , , , , ], [, , , , , , , , ], [, , RETURN, -1, , , , , ], [, , OTHER, 0, , , , , ], [, , SALE, 1, , , , , ], [, , StoreSales5SD_OrderDept.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [\'StoreSales5SD_Product.proto\',\'StoreSales5SD_Summary.proto\'], , , , ], [, , , , , , , , ], [, , Order, , , , , , ], [, , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , quantity, 2, LABEL_REQUIRED, TYPE_INT32, , , ], [, , Deptartment, , , , , , ], [, , , , , , , , ], [, , department, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , ], [, , product, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Product, , ], [, , summary, 4, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Summary, , ], [, , , , , SPEED, , , ], [, , StoreSales5SD_Product.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [\'StoreSales5SD_Enum.proto\'], , , , ], [, , , , , , , , ], [, , Product, , , , , , ], [, , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , saleDate, 2, LABEL_REPEATED, TYPE_INT32, , , ], [, , quantity, 3, LABEL_REPEATED, TYPE_INT32, , , ], [, , price, 4, LABEL_REPEATED, TYPE_INT64, , , ], [, , saleType, 5, LABEL_REPEATED, TYPE_ENUM, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.SaleType, , ], [, , , , , SPEED, , , ], [, , StoreSales5SD_Enum.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [], , , , ], [, , , , , , , , ], [, , SaleType, , , , , , ], [, , , , , , , , ], [, , RETURN, -1, , , , , ], [, , OTHER, 0, , , , , ], [, , SALE, 1, , , , , ], [, , StoreSales5SD_Summary.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [], , , , ], [, , , , , , , , ], [, , Summary, , , , , , ], [, , , , , , , , ], [, , quantity, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , price, 2, LABEL_REQUIRED, TYPE_INT64, , , ], [, , count, 3, LABEL_REQUIRED, TYPE_INT32, , , ], [, , , , , SPEED, , , ], [, , StoreSales5SD_Summary.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [], , , , ], [, , , , , , , , ], [, , Summary, , , , , , ], [, , , , , , , , ], [, , quantity, 1, LABEL_REQUIRED, TYPE_INT32, , , ], [, , price, 2, LABEL_REQUIRED, TYPE_INT64, , , ], [, , count, 3, LABEL_REQUIRED, TYPE_INT32, , , ], [, , , , , SPEED, , , ]]')

		assert_p('JTreeTable', 'Content', '[[, , , , , , , , , , ], [, , , , , , , , , , ], [, , StoreSales5SD.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [\'StoreSales5SD_Product.proto\',\'StoreSales5SD_OrderDept.proto\',\'StoreSales5SD_Summary.proto\'], [], [], , , , ], [, , , , , , , , , , ], [, , Store, , , , , , , , ], [, , , , , , , , , , ], [, , store, 1, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , , , ], [, , department, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Deptartment, , , , ], [, , order, 4, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Order, , , , ], [, , summary, 5, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Summary, , , , ], [, , , , , , SPEED, , , , ], [, , StoreSales5SD_Product.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [\'StoreSales5SD_Enum.proto\'], [], [], , , , ], [, , , , , , , , , , ], [, , Product, , , , , , , , ], [, , , , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , saleDate, 2, LABEL_REPEATED, TYPE_INT32, , , , , ], [, , quantity, 3, LABEL_REPEATED, TYPE_INT32, , , , , ], [, , price, 4, LABEL_REPEATED, TYPE_INT64, , , , , ], [, , saleType, 5, LABEL_REPEATED, TYPE_ENUM, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.SaleType, , , , ], [, , , , , , SPEED, , , , ], [, , StoreSales5SD_Enum.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [], [], [], , , , ], [, , , , , , , , , , ], [, , SaleType, , , , , , , , ], [, , , , , , , , , , ], [, , RETURN, -1, , , , , , , ], [, , OTHER, 0, , , , , , , ], [, , SALE, 1, , , , , , , ], [, , StoreSales5SD_OrderDept.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [\'StoreSales5SD_Product.proto\',\'StoreSales5SD_Summary.proto\'], [], [], , , , ], [, , , , , , , , , , ], [, , Order, , , , , , , , ], [, , , , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , quantity, 2, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , Deptartment, , , , , , , , ], [, , , , , , , , , , ], [, , department, 1, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , name, 2, LABEL_REQUIRED, TYPE_STRING, , , , , ], [, , product, 3, LABEL_REPEATED, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Product, , , , ], [, , summary, 4, LABEL_OPTIONAL, TYPE_MESSAGE, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.Summary, , , , ], [, , , , , , SPEED, , , , ], [, , StoreSales5SD_Product.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [\'StoreSales5SD_Enum.proto\'], [], [], , , , ], [, , , , , , , , , , ], [, , Product, , , , , , , , ], [, , , , , , , , , , ], [, , keycode, 1, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , saleDate, 2, LABEL_REPEATED, TYPE_INT32, , , , , ], [, , quantity, 3, LABEL_REPEATED, TYPE_INT32, , , , , ], [, , price, 4, LABEL_REPEATED, TYPE_INT64, , , , , ], [, , saleType, 5, LABEL_REPEATED, TYPE_ENUM, .net.sf.RecordEditor.ProtoBuf.re.Test.SalesX.SaleType, , , , ], [, , , , , , SPEED, , , , ], [, , StoreSales5SD_Enum.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [], [], [], , , , ], [, , , , , , , , , , ], [, , SaleType, , , , , , , , ], [, , , , , , , , , , ], [, , RETURN, -1, , , , , , , ], [, , OTHER, 0, , , , , , , ], [, , SALE, 1, , , , , , , ], [, , StoreSales5SD_Summary.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [], [], [], , , , ], [, , , , , , , , , , ], [, , Summary, , , , , , , , ], [, , , , , , , , , , ], [, , quantity, 1, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , price, 2, LABEL_REQUIRED, TYPE_INT64, , , , , ], [, , count, 3, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , , , , , SPEED, , , , ], [, , StoreSales5SD_Summary.proto, net.sf.RecordEditor.ProtoBuf.re.Test.SalesX, [], [], [], , , , ], [, , , , , , , , , , ], [, , Summary, , , , , , , , ], [, , , , , , , , , , ], [, , quantity, 1, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , price, 2, LABEL_REQUIRED, TYPE_INT64, , , , , ], [, , count, 3, LABEL_REQUIRED, TYPE_INT32, , , , , ], [, , , , , , SPEED, , , , ]]')

	close()
